/*
 * @Author: your name
 * @Date: 2021-01-29 15:08:34
 * @LastEditTime: 2021-02-04 11:07:20
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \wechat-node\routes\news.js
 */
const router = require('koa-router')();
const {videoModel} = require('../model/video');

// 获取视频
router.get('/video', async (ctx, next) => {
    await videoModel.getVideos(ctx);
});
router.post('/video/comment', async (ctx, next) => {
    await videoModel.comment(ctx);
});
router.get('/video/comment', async (ctx, next) => {
    await videoModel.getComment(ctx);
});
router.post('/add/history', async (ctx, next) => {
    await videoModel.addHistory(ctx);
});
router.get('/video/history', async (ctx, next) => {
    await videoModel.videoHistory(ctx);
});

module.exports = router;